package com.yupi.yoj.mq;


import org.springframework.amqp.core.Binding;
import org.springframework.amqp.core.BindingBuilder;
import org.springframework.amqp.core.FanoutExchange;
import org.springframework.amqp.core.Queue;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class FanoutConfig {
//    @Bean
//    public FanoutExchange fanoutexchange() {
//        //创建广播模式交换机
//        return new FanoutExchange("yoj.fanoutexchange");
//    }
//    // 创建队列
//    @Bean
//    public Queue fanoutQueue() {
//        return new Queue("fanout.queue1");
//    }
//    // 绑定交换机和队列之间的关系
//    @Bean
//    public Binding bindingQueue1(Queue fanoutQueue1, FanoutExchange fanoutExchange) {
//        BindingBuilder.bind(fanoutQueue1).to(fanoutExchange);
//        return BindingBuilder.bind(fanoutQueue1).to(fanoutExchange);
//    }
}
